package com.ds.lens.data.common.apmapi.in;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.util.List;


@Data
public class ApmMetricInVO {
    private Range range;
    private List<Condition> condition;
    private List<Aggregation> aggregation;

    public static void main(String[] args) {
        String jsonStr = "{\"range\":{\"startTime\":\"123\",\"endTime\":\"456\"},\"condition\":[{\"field\":\"app\",\"value\":[\"101\"]},{\"field\":\"tier\",\"value\":[\"1\",\"2\"]}],\"aggregation\":[{\"name\":\"平均响应时间\",\"metrics\":{\"layer\":\"实例\",\"avg\":\"requestTime\"}}]}";
        ApmMetricInVO jsonObject = JSONObject.parseObject(jsonStr, ApmMetricInVO.class);
        System.out.println(jsonObject);
    }

}
